<template>
  <div>
    <van-field :name="formItem.name" :label="formItem.label">
      <template #input>
        <van-switch v-model="formItem.value" :size="formItem.size" />
      </template>
    </van-field>
  </div>
</template>

<script>
/**
 * switch开关
 */
export default {
  props: {
    formItem: {
      type: Object,
      default: {
        name:"",
        label:"",
        value:"",
        size:""
      }
    }
  }
};
</script>
